<template>
	<view class="content">
		<view class="title">
			{{name}}
		</view>
		<image :src="imgsrc" mode="widthFix" class="image-view"></image>
		<view class="uni-text">
			{{content}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				access_token:'',
				newsid:'',
				name:'',
				content:'',
				imgsrc:''
			}
		},
		onLoad:function(e){
			console.log("进入info");
			console.log(e);
			this.access_token=e.access_token;
			this.newsid=e.newsid;
			uni.request({
				url: getApp().globalData.service_url+'/item/selectById?access_token='+this.access_token+'&id='+this.newsid,
				method: 'GET',
				data: {},
				success: res => {
					console.log(res.data)
					this.name=res.data.data.title;
					this.content=res.data.data.content;
					this.imgsrc=res.data.data.img;
				},
				fail: res => {
					console.log(res);
				},
				complete: () => {}
			});
		},
		methods: {
			
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	
	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
